use std::io::Read;
use std::os::windows::process::CommandExt;
use std::process::{ChildStdout, Command};

fn main2() {
    use pwner::Spawner;
    let mut child1 = Command::new(r##"ls"##)
        .arg(r##"-a"##)
        .output()
        .expect("command failed to start");
    let bytes = child1.stdout;
    println!("{}", String::from_utf8(bytes).unwrap())
}

fn main() {
    use pwner::Spawner;
    let mut child1 = Command::new(r##"wmic"##)
        .arg(r##"datafile where name="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" get Version /value"##)
        .output()
        .expect("command failed to start");
    let bytes = child1.stdout;
    println!("{}", String::from_utf8(bytes).unwrap());
}

fn main4() {
    cmd_lib::run_cmd!(wmic datafile where name="C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe" get Version /value);
}
